<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>审核管理</title>
        <%-- 全站样式 --%>
        <jsp:include page="/WEB-INF/jsps/template_style.jsp"></jsp:include>
    
    </head>

    <body class="page-body skin-navy">
        <div class="page-container">
           	<%--侧边栏 --%>
			<jsp:include page="/WEB-INF/jsps/sidebar.jsp"></jsp:include>
            <div class="main-content">
                <%--导航栏 --%>
				<jsp:include page="/WEB-INF/jsps/navbar.jsp"></jsp:include>
                <div class="page-title">
                    <div class="title-env">
                        <h1 class="title">审核管理</h1>
                        <p class="description">
                            您可以在此页面上对用户的申请进行审核。
                        </p>
                    </div>
                </div>
                <div class="row">
                    <!-- Tabbed panel 2 -->
                    <div class="panel panel-default panel-tabs">
                        <!-- Add class "collapsed" to minimize the panel -->
                        <div class="panel-heading">
                            <h3 class="panel-title">申请列表</h3>
                            <div class="panel-options">
                                <ul class="nav nav-tabs">
                                    <li class="active">
                                        <a href="#tab-4" data-toggle="tab">待审核</a>
                                    </li>
                                    <li>
                                        <a href="#tab-5" data-toggle="tab">通过</a>
                                    </li>
                                    <li>
                                        <a href="#tab-6" data-toggle="tab">拒绝</a>
                                    </li>
                                    <li>
                                        <a href="#tab-7" data-toggle="tab">所有申请</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab-4">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                            <!-- 待审核面板 -->
                                            <table class="table table-bordered table-striped" id="example-2">
                                                <thead>
                                                    <tr>
                                                        <th>编号</th>
                                                        <th>审核类型</th>
                                                        <th>申请时间</th>
                                                        <th>申请人</th>
                                                        <th>操作</th>
                                                    </tr>
                                                </thead>
                                                <tbody class="middle-align">
                                                   <c:forEach var="session_apply"  items="${session_apply }">
                                                   	<c:if test="${ session_apply.applyStatus==2}">
								                    <tr>
								                        <td>${ session_apply.applicationID}</td>
								                        <c:choose>
								                        	<c:when test="${ session_apply.applyType == 0}">
								                        		<td>角色申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 1}">
								                        		<td>解冻申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 2}">
								                        		<td>光谱申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 3}">
								                        		<td>检验线申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 4}">
								                        		<td>操作人员的光谱申请</td>
								                        	</c:when>
								                        </c:choose>	
								                        <td>${ session_apply.applicationTime}</td>
								                        <td>${ session_apply.name}</td>
		                                                <td>
                                                            <a href="#" class="btn btn-secondary btn-sm btn-icon icon-left" data-toggle="modal" data-target="#check" onclick="pass(${ session_apply.applicationID},${ session_apply.applyStatus},'${ session_apply.email}',${ session_apply.applyType})">
                                                                通过
                                                            </a>

                                                            <a href="#" class="btn btn-danger btn-sm btn-icon icon-left" data-toggle="modal" data-target="#check" onclick="reject(${ session_apply.applicationID},${ session_apply.applyStatus},'${ session_apply.email}',${ session_apply.applyType})">
                                                                拒绝
                                                            </a>
                                                            <a href="#" class="btn btn-info btn-sm btn-icon icon-left"  onclick="detail(${ session_apply.applyObjectID},${ session_apply.applyType})">
                                                                详细
                                                            </a>
                                                        </td>
								                      </tr>
								                      </c:if>
								                     </c:forEach> 
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane" id="tab-5">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                            <!--- 通过面板 -->
                                            <table class="table table-bordered table-striped" id="example-3">
                                                <thead>
                                                    <tr>
                                                        <th>编号</th>
                                                        <th>审核类型</th>
                                                        <th>申请时间</th>
                                                        <th>申请人</th>
                                                        <th>操作</th>
                                                    </tr>
                                                </thead>
                                                <tbody class="middle-align">
                                                   <c:forEach var="session_apply"  items="${session_apply }">
                                                   	<c:if test="${ session_apply.applyStatus ==1}">
								                    <tr>
								                        <td>${ session_apply.applicationID}</td>
								                        <c:choose>
								                        	<c:when test="${ session_apply.applyType == 0}">
								                        		<td>角色申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 1}">
								                        		<td>解冻申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 2}">
								                        		<td>光谱申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 3}">
								                        		<td>检验线申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 4}">
								                        		<td>操作人员的光谱申请</td>
								                        	</c:when>
								                        </c:choose>	
								                        <td>${ session_apply.applicationTime}</td>
								                        <td>${ session_apply.name}</td>
                                                        <td>
                                                            <a href="#" class="btn btn-info btn-sm btn-icon icon-left" onclick="read(${ session_apply.applicationID})">
                                                                查看
                                                            </a>
                                                        </td>
								                      </tr>
								                      </c:if>
								                     </c:forEach> 
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                            
                                </div>
                                <div class="tab-pane" id="tab-6">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                            <table class="table table-bordered table-striped" id="example-4">
                                                <thead>
                                                <tr>
                                                    <th>编号</th>
                                                    <th>审核类型</th>
                                                    <th>申请时间</th>
                                                    <th>申请人</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tbody class="middle-align">
                                                   <c:forEach var="session_apply"  items="${session_apply }">
                                                   <c:if test="${ session_apply.applyStatus ==0}">
								                    <tr>
								                        <td>${ session_apply.applicationID}</td>
								                        <c:choose>
								                        	<c:when test="${ session_apply.applyType == 0}">
								                        		<td>角色申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 1}">
								                        		<td>解冻申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 2}">
								                        		<td>光谱申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 3}">
								                        		<td>检验线申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 4}">
								                        		<td>操作人员的光谱申请</td>
								                        	</c:when>
								                        </c:choose>								                       
								                        <td>${ session_apply.applicationTime}</td>
								                        <td>${ session_apply.name}</td>
                                                        <td>
                                                            <a href="#" class="btn btn-info btn-sm btn-icon icon-left" onclick="read(${ session_apply.applicationID})">
                                                                查看
                                                            </a>
                                                        </td>
								                      </tr>
								                      </c:if>
								                     </c:forEach> 
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane" id="tab-7">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                        <!---------所有申请面板-------------------------------------------------------------------------->
                                            <table class="table table-bordered table-striped" id="example-5">
                                                <thead>
                                                <tr>
                                                    <th>编号</th>
                                                    <th>审核类型</th>
                                                    <th>申请时间</th>
                                                    <th>申请人</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tbody class="middle-align">
                                                 	<c:forEach var="session_apply"  items="${session_apply }">
								                    <c:if test="${ session_apply.applyStatus == 0 || session_apply.applyStatus==1
								                    || session_apply.applyStatus== 2}">
								                    <tr>
								                        <td>${ session_apply.applicationID}</td>
								                        <c:choose>
								                        	<c:when test="${ session_apply.applyType == 0}">
								                        		<td>角色申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 1}">
								                        		<td>解冻申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 2}">
								                        		<td>光谱申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 3}">
								                        		<td>检验线申请</td>
								                        	</c:when>
								                        	<c:when test="${ session_apply.applyType == 4}">
								                        		<td>操作人员的光谱申请</td>
								                        	</c:when>
								                        </c:choose>	
								                        <td>${ session_apply.applicationTime}</td>
								                        <td>${ session_apply.name}</td>
                                                        <td>
                                                            <a href="#" class="btn btn-info btn-sm btn-icon icon-left" onclick="read(${ session_apply.applicationID})">
                                                                查看
                                                            </a>
                                                        </td>
								                      </tr>
								                      </c:if>
								                     </c:forEach> 
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>

				<%--页脚 --%>
				<jsp:include page="/WEB-INF/jsps/footer.jsp"></jsp:include>
            </div>
        </div>

        <div class="page-loading-overlay">
            <div class="loader-2"></div>
        </div>

        <div class="modal fade" id="check">
            <div class="modal-dialog">
                <div class="modal-content">
					<form action="<c:url value='/CheckApply.do'/>" method="post">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">审核</h4>
                    </div>
                    <div class="modal-body">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="field-1" class="control-label">审核理由</label>
                                    <textarea class="form-control" id="field-1" rows="3" placeholder="请输入审核理由" required="required" name="reason"></textarea>
                                	<input type="hidden" name="applyStatus" id="hs" class="form-control" value=""/>
                                	<input type="hidden" name="applicationID" id="hid" class="form-control" value=""/>
                                	<input type="hidden" name="email" id="eid" class="form-control" value=""/>
                                	<input type="hidden" name="applyType" id="aid" class="form-control" value=""/>
                                </div>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                            <button type="submit" class="btn btn-white" >确定</button>
                        </div>
                    </div>
                    </form>
                </div>
            </div>
        </div>

            <div class="modal fade" id="read">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <input type="hidden" name="applicationID" id="hid" class="form-control" value=""/>
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h4 class="modal-title">查看审核</h4>
                        </div>
                        <div class="modal-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="applicationTimeid-r" class="control-label">申请时间</label>
                                        <input type="text" name="applicationTime" id="applicationTimeid-r" class="form-control" value="" disabled/>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="reasonid-r" class="control-label">审核理由</label>
                                        <textarea class="form-control" id="reasonid-r" rows="3"  name="reason" disabled></textarea>
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <div class="modal fade" id="detail-line"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel">  	
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">检验线申请详细信息</h4>
                    </div>
					
                    <div class="modal-body">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="row">
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="connectionAlgorithmIDid" class="control-label">检验线组合编号</label>

                                            <input type="text" class="form-control" id="connectionAlgorithmIDid" name="connectionAlgorithmID" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="hardwareIDid" class="control-label">硬件编号</label>

                                            <input type="text" class="form-control" id="hardwareIDid" name="hardwareID" disabled/>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="detectedID" class="control-label">被检测物编号</label>

                                            <input type="text" class="form-control" id="detectedID" placeholder="xxxxxx" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="standardIDid" class="control-label">国际标准</label>

                                            <input type="text" class="form-control" id="standardIDid" name="standardID" disabled/>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="anaidlysisAlgorithmID" class="control-label">分析算法ID</label>

                                            <input type="text" class="form-control" id="analysisAlgorithmIDid" name="analysisAlgorithmID" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="PretreatmentAlgorithmIDid" class="control-label">预处理算法ID</label>

                                            <input type="text" class="form-control" id="PretreatmentAlgorithmIDid" name="PretreatmentAlgorithmID" disabled/>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="field-1" class="control-label">检验线组合编号</label>

                                            <input type="text" class="form-control" id="field-1" placeholder="xxxxxx" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="field-1" class="control-label">检验线描述</label>

                                            <input type="text" class="form-control" id="field-1" placeholder="001" disabled/>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label for="applicationTimeid" class="control-label">申请时间</label>
                                            <input type="text" class="form-control" id="applicationTimeid" name="applicationTime" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                         <div class="form-group">
                                    <label for="urlid" class="control-label">申请文件</label>
                                    <input type="hidden"  id="Conurlid" name="fileUrl" value=""/>
                                    <br><button type="button" onclick="downCon()" class="btn btn-default col-md-12">查看</button>
                                </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade" id="detail-spectrum"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">光谱申请详细信息</h4>
                    </div>
					
                    <div class="modal-body">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="row">
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="spectrumIdid" class="control-label">光谱编号</label>

                                            <input type="text" class="form-control" id="spectrumIdid" name="spectrumId" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="applicationTimeid" class="control-label">申请时间</label>

                                            <input type="text" class="form-control" id="applicationTimeid" name="applicationTime" disabled/>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label for="emailid" class="control-label">邮箱</label>
                                            <input type="text" class="form-control" id="emailid" name="email" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label for="idid" class="control-label">执行标准</label>
                                            <input type="text" class="form-control" id="idid" name="id" disabled/>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label for="field-1" class="control-label">硬件编号</label>

                                            <input type="text" class="form-control" id="field-1" placeholder="xxxx" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label for="field-1" class="control-label">被检测物名称</label>
                                            <input type="text" class="form-control" id="field-1" placeholder="白菜" disabled/>
                                        </div>
                                    </div>
                                </div>

                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                    <label for="urlid" class="control-label">申请文件</label>
                                    <input type="hidden"  id="Speurlid" name="fileUrl" value=""/>
                                    <br><button type="button" onclick="downSpe()" class="btn btn-default col-md-12">查看</button>
                                </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade" id="detail-user"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">用户权限申请详细信息</h4>
                    </div>
					
                    <div class="modal-body">
                        <div class="row">
                            <div class="col-md-8">
                                <div class="row">
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="userid-u" class="control-label">用户编号</label>

                                            <input type="text" class="form-control" id="userid-u" name="userID" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="nameid" class="control-label">真实姓名</label>

                                            <input type="text" class="form-control" id="nameid" name="name" disabled/>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label for="sexid" class="control-label">性别</label>
											  <input type="text" class="form-control" id="sexid" name="sex" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label for="birthdayid" class="control-label">出生年月</label>

                                            <input type="text" class="form-control" id="birthdayid" name="birthday" disabled/>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label for="emailid-u" class="control-label">邮箱地址</label>
                                            <input type="text" class="form-control" id="emailid-u" name="email" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label for="phoneNumberid" class="control-label">手机号码</label>
                                            <input type="text" class="form-control" id="phoneNumberid" name="phoneNumber" disabled/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <img src="../assets/images/user-4.png" alt="user-img" class="img-cirlce img-responsive img-thumbnail" />
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">

                                <div class="form-group">
                                    <label for="IdCardid" class="control-label">身份证号</label>

                                    <input type="text" class="form-control" id="IdCardid" name="IdCard" disabled/>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="roleID-u" class="control-label">申请角色</label>
                                    <input type="text" class="form-control" id="roleID-u" name="roleID" disabled/>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="urlid" class="control-label">申请文件</label>
                                    <input type="hidden"  id="urlid" name="fileUrl" value=""/>
                                    <br><button type="button" onclick="download()" class="btn btn-default col-md-12">查看</button>
                                </div>
                            </div>
                            <script type="text/javascript"></script>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="personAddressid" class="control-label">个人地址</label>

                                    <input type="text" class="form-control" id="personAddressid" name="personAddress" disabled/>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="workAddressid" class="control-label">工作地址</label>

                                    <textarea class="form-control autogrow" cols="5" id="workAddressid" name="workAddress" disabled></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade" id="detail-freeze"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">解冻申请详细信息</h4>
                    </div>
					
                    <div class="modal-body">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="row">
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="emailid-f" class="control-label">邮箱</label>

                                            <input type="text" class="form-control" id="emailid-f" name="email" disabled/>
                                        </div>
                                    </div>
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <label for="userid-f" class="control-label">用户编号</label>

                                            <input type="text" class="form-control" id="userid-f" name="userID" disabled/>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <label for="applicationTimeid-f" class="control-label">申请时间</label>
                                            <input type="text" class="form-control" id="applicationTimeid-f"  name="applicationTime" disabled/>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <label for="reasonid-f" class="control-label">申请理由</label>
                                            <textarea class="form-control" id="reasonid-f" name="reason" disabled></textarea>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </div>

	    <%-- 尾部内容 --%>
	    <jsp:include page="/WEB-INF/jsps/template_tail.jsp" />
        <!-- Imported styles on this page -->
        <link rel="stylesheet" href="assets/js/datatables/dataTables.bootstrap.css">
        <!-- Imported scripts on this page -->
        <script src="assets/js/datatables/js/jquery.dataTables.min.js"></script>
        <script src="assets/js/datatables/dataTables.bootstrap.js"></script>
        <script src="assets/js/datatables/yadcf/jquery.dataTables.yadcf.js"></script>
        <!--Specific JS for this page-->
        <script type="text/javascript">
            jQuery(document).ready(function($) {
                $("#example-2").dataTable({
                    aLengthMenu: [
                        [5, 10, 25, 50, 100, -1],
                        [5, 10, 25, 50, 100, "所有"]
                    ]
                });
            });
            
            jQuery(document).ready(function($) {
                $("#example-3").dataTable({
                    aLengthMenu: [
                        [5, 10, 25, 50, 100, -1],
                        [5, 10, 25, 50, 100, "所有"]
                    ]
                });

            });
            
            jQuery(document).ready(function($) {
                $("#example-4").dataTable({
                    aLengthMenu: [
                        [5, 10, 25, 50, 100, -1],
                        [5, 10, 25, 50, 100, "所有"]
                    ]
                });
               
            });
            
            jQuery(document).ready(function($) {
                $("#example-5").dataTable({
                    aLengthMenu: [
                        [5, 10, 25, 50, 100, -1],
                        [5, 10, 25, 50, 100, "所有"]
                    ]
                });
              
            });
            
            function pass(id,status,email,atype) { 
            	
				//修改审核状态
				status=1;//设置为通过
                $('#hs').val(status);//给会话中的隐藏属性赋值 
        		//将id赋值
            	$('#hid').val(id);
            	$('#eid').val(email);
            	$('#aid').val(atype);
            }
            
            function reject(id,status,email,atype) { 
				//修改审核状态
				status=0;//设置为拒绝
                $('#hs').val(status);//给会话中的隐藏属性赋值 
        		//将id赋值
            	$('#hid').val(id);
            	$('#eid').val(email);
            	$('#aid').val(atype);
				
               
            } 
            
            function read(id){
            	$.ajax({
        			type:"POST",
        			url:"/listAllApplyById.do",
        			data:{"applicationID":id},
        			dataType:"json",
        			success: function(data){
        				$('#applicationTimeid-r').val(data.session_apply.applicationTime);
        				$('#reasonid-r').val(data.session_apply.reason);
        			}
        		});
            	
            	var $modal = $('#read'); 
        		$modal.modal({backdrop: 'static'});
            }
            
            
            function detail(oid,type){
            	if(type==0){   		
            		$.ajax({
            			type:"POST",
            			url:"/listAllApplyByType.do",
            			data:{"applyObjectID":oid,"applyType":type},
            			dataType:"json",
            			success: function(data){
            				$('#userid-u').val(data.session_apply.userID);
            				$('#emailid-u').val(data.session_apply.email);
            				$('#nameid').val(data.session_apply.name);
            				$('#birthdayid').val(data.session_apply.birthday);
            				$('#phoneNumberid').val(data.session_apply.phoneNumber);
            				$('#IdCardid').val(data.session_apply.IdCard);
            				$('#roleID-u').val(data.session_apply.roleID);
            				$('#personAddressid').val(data.session_apply.personAddress);
            				$('#workAddressid').val(data.session_apply.workAddress);
            				$('#urlid').val(data.session_apply.fileUrl);
            				if(0 == data.session_apply.sex){
            					$('#sexid').val("男");
            				}
            				else if(1 == data.session_apply.sex){
            					$('#sexid').val("女");
            				}
            				else if(2 == data.session_apply.sex){
            					$('#sexid').val("保密");
            				}
            					
            				
            			}
            		});
            		var $modal = $('#detail-user'); 
            		$modal.modal({backdrop: 'static'});
            	}else if(type==1){
            		$.ajax({
            			type:"POST",
            			url:"/listAllApplyByType.do",
            			data:{"applyObjectID":oid,"applyType":type},
            			dataType:"json",
            			success: function(data){  
            				$('#emailid-f').val(data.session_apply.email);
            				$('#userid-f').val(data.session_apply.userID);
            				$('#applicationTimeid-f').val(data.session_apply.applicationTime);
            				$('#reasonid-f').val(data.session_apply.reason);
            			}
            		});
            		var $modal = $('#detail-freeze'); 
            		$modal.modal({backdrop: 'static'});
            	}else if(type==2 || type==4){
            		
            		$.ajax({
            			type:"POST",
            			url:"/listAllApplyByType.do",
            			data:{"applyObjectID":oid,"applyType":type},
            			dataType:"json",
            			success: function(data){
            			    
            				$('#emailid').val(data.session_apply.email);
            				$('#userid').val(data.session_apply.userID);
            				$('#applicationTimeid').val(data.session_apply.applicationTime);
            				$('#reasonid').val(data.session_apply.reason);
            				$('#Speurlid').val(data.session_apply.fileUrl);
            			}
            		});
            		var $modal = $('#detail-spectrum'); 
            		$modal.modal({backdrop: 'static'});
            	}else if(type==3){
            		$.ajax({
            			type:"POST",
            			url:"/listAllApplyByType.do",
            			data:{"applyObjectID":oid,"applyType":type},
            			dataType:"json",
            			success: function(data){
            			    
            				$('#hardwareIDid').val(data.session_apply.hardwareID);
            				$('#Conurlid').val(data.session_apply.fileUrl);
            				
            			}
            		});
            		var $modal = $('#detail-line'); 
            		$modal.modal({backdrop: 'static'});
            	}
            	
            }
            function download(){
            	var fileurl=document.getElementById('urlid').value;
            	var hre = '/downApplyFile.do?fileUrl='+fileurl;            		                                           	
            	location.href = hre;
            }
            
            function downCon(){
            	var fileurl=document.getElementById('Conurlid').value;
            	var hre = '/downApplyFile.do?fileUrl='+fileurl;            		                                           	
            	location.href = hre;
            }
            
            function downSpe(){
            	var fileurl=document.getElementById('Speurlid').value;
            	var hre = '/downApplyFile.do?fileUrl='+fileurl;            		                                           	
            	location.href = hre;
            }
            
        </script>
    </body>

</html>